<template>
  <el-row class="tac">
    <el-col :span="24">
      <h2 class="mb-2">系统菜单</h2>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
      >
        <el-sub-menu index="1">
          <template #title>
            <el-icon><location /></el-icon>
            <span>个人信息</span>
          </template>
          <el-menu-item index="1-1" @click="nomone">信息详情</el-menu-item>
          <el-dialog v-model="dialogFormVisible" width="40%" title="个人信息">
            <PersonDetail></PersonDetail>
          </el-dialog>
          <el-menu-item index="1-2" @click="this.nomtwo = true"
            >修改信息</el-menu-item
          >
          <el-dialog v-model="nomtwo" width="30%" center>
            <information></information>
          </el-dialog>
        </el-sub-menu>
        <el-sub-menu index="2">
          <template #title>
            <el-icon><setting /></el-icon>
            <span>社区管理</span>
          </template>
          <el-menu-item index="2-1" @click="communityone"
            >社区详情</el-menu-item
          >
          <el-menu-item index="2-2" @click="communitytwo"
            >社区管理员</el-menu-item
          >
        </el-sub-menu>
        <el-sub-menu index="3">
          <template #title>
            <el-icon><setting /></el-icon>
            <span>绿化管理</span>
          </template>
          <el-menu-item index="2-3-1" @click="projectone"
            >绿化规划</el-menu-item
          >
          <el-menu-item index="2-3-3" @click="projecttwo"
            >树木管理</el-menu-item
          >
        </el-sub-menu>
        <el-sub-menu index="4">
          <template #title>
            <el-icon><document /></el-icon>
            <span>通知管理</span>
          </template>
          <el-menu-item index="3-1" @click="informone = true"
            >通知发布</el-menu-item
          >
          <el-dialog v-model="informone" width="30%" center>
            <notice-issue></notice-issue>
          </el-dialog>
        </el-sub-menu>
        <el-sub-menu index="5" disabled>
          <template #title>
            <el-icon><setting /></el-icon>
            <span>敬请期待</span>
          </template>
        </el-sub-menu>
      </el-menu>
    </el-col>
  </el-row>
</template>

<script>
import Information from "../modifaction/information.vue";
import PersonDetail from "../modifaction/person-detail.vue";
import NoticeIssue from "./admin/notice-issue.vue";
export default {
  components: { PersonDetail, NoticeIssue, Information },
  props: {
    loger: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {
      nomtwo: false,
      informone: false,
      Communitylist: [{}],
      persons: [{}],
      project1: [{}],
      project2: [{}],
      notices: {},
      dialogFormVisible: false,
    };
  },
  methods: {
    nomone() {
      this.dialogFormVisible = true;
    },
    communityone() {
      this.$router.push("/navadmin/detail");
    },
    communitytwo() {
      this.$router.push("/navadmin/community");
    },
    projectone() {
      this.$router.push("/navadmin/allplan");
    },
    projecttwo() {
      this.$router.push("/navadmin/treeplan");
    },
  },
};
</script>

<style scoped>
.el-sub-menu {
  margin-top: 15px;
}
.mb-2 {
  margin-left: 80px;
  margin-top: 50px;
}
span {
  margin-left: 20px;
  font-size: 18px;
}
.el-icon {
  margin-left: 50px;
  margin-right: -8px;
}
.el-menu-item {
  margin-left: 70px;
  font-size: 16px;
}
</style>